﻿
@{
    ViewData["Title"] = "登录";
    Layout = "~/Areas/WX/Views/Shared/_Layout.cshtml";
}

<div class="hui-wrap">
    <img src="~/images/dqk.jpg" width="100%" height="200px" />

</div>

<div class="hui-wrap">
    <form style="padding:28px 10px;" class="hui-form" id="form1" method="post">

        <div class="hui-form-items">
            <div class="hui-form-items-title">账号</div>
            <input type="text" id="username" name="username" class="hui-input" placeholder="请输入账号" />

        </div>
        <div class="hui-form-items">
            <div class="hui-form-items-title">密码</div>
            <input type="password" id="pwd" name="pwd" class="hui-input hui-pwd-eye" placeholder="请输入密码" />

        </div>

       

        <div style="padding:15px 8px;">
            <button type="button" class="hui-button hui-button-large hui-primary" id="submitBtn" style="margin-top:15px;">登录</button>
        </div>
    </form>
    <div>
        <div class="HUI_Text" style="margin:0px 10px;">
            <div style="float:left;margin-left:10px;">
                <a href="/WX/Account/ForgotPassword"><span style="color:#3283FA;">忘记密码？</span></a>
            </div>
            <div style="float:right;margin-right:10px;">
                <a href="/WX/Account/Registered"><span class="HUI_FR" style="color:#3283FA;">新用户注册</span></a>
            </div>
            <div style="clear:both"></div>
        </div>
    </div>
</div>

@section Scripts{
    <script src="~/HUI-master/js/hui-form.js"></script>

    <script type="text/javascript">
        hui.formInit();
        //表单元素数据收集演示
        hui('#submitBtn').click(function () {
            var data = hui.getFormData('#form1');
            hui.post(
                '/WX/Account/Login',
                data,
                function (msg) {
                    if (msg == 'ok') {
                        window.location.href = '/WX/Home/Index'
                    } else {
                        hui.alert(msg, '好的');
                    }
                },
                function (e) {
                    hui.iconToast('读取消息失败', 'warn');
                }
            );
        });
    </script>
}


